package com.th.common.core.page;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;
import org.apache.poi.ss.formula.functions.T;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @Author tuhang
 * @PackageName nswcy-crowdsource-back
 * @Package com.th.common.core.page
 * @Date 2022/9/30 22:34
 * @Version 1.0
 */
@Data
public class PageParam {

    private Integer pageNum = 1;

    private Integer pageSize = 10;

    //总数
    private Integer total;
    //当前页数据
    private List<Object> data;

    /**
     * 自动生成 mybatis page对象
     * @return
     */
    public Page of(){
        return new Page(this.pageNum, this.pageSize);
    }
}
